home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d7
/
exechk.arc
/
EXECHK.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1990-12-06
|
2KB
|
55 lines
(*******************************************************************
Program/Unit EXECHK.TPU
Written 06 Dec 90
Revised .........
Author Johnathan J. Stein
PO Box 346
Perrysburg, OH 43551
CompuServe 76576,470
Purpose To illustrate how to implement EXE
file "stamping", in order to discourage
illegal copying WITHOUT using copy protection.
Contents 1 Function , 2 Procedures
Please send comments, suggestions or complaints to the above address.
*******************************************************************)
UNIT exechk ;
INTERFACE
USES Dos ;
function IsExePersonalized ( S : string ) : boolean ;
procedure ExeInstallData ( S : string ; VAR V ; NumBytes : longint ) ;
procedure ExeReadData ( S : string ; VAR V ; NumBytes : longint ) ;
IMPLEMENTATION
{$I exechk.doc } (* Documentation *)
{$I exechk.def } (* EXE header file header info *)
{$I abort.inc } (* Global halt, w/message *)
{$I exechk.inc } (* File access *)
BEGIN
(*******************************************************************
NETWORKS & FILE ATTRIBUTES:
---------------------------
To eliminate problems on networks and for when the EXE file attribute
has the ReadOnly bit set.
If you eliminate this initialization code, you may also remove the
USES Dos; statement above (it is only used for DosVersion).
*******************************************************************)
if Lo ( DosVersion ) >= 3 then
begin
DefaultFileMode := 64 ; (* Read_DenyNone *)
DefaultWriteMode := 66 ; (* ReadWrite_DenyNone *)
end
else
begin
DefaultFileMode := 0 ; (* Read_Only *)
DefaultWriteMode := 2 ; (* Read_Write *)
end ;
FileMode := DefaultFileMode ;
END.